window.addEventListener('pageshow', function() {
    // 获取元素
    var popup = document.querySelector('.popup');
    this.clearTimeout(timer);
    var timer = setTimeout(close, 1000);

    function close() {
        popup.style.display = 'none';
    }
})